﻿using System;
using System.IO;
using System.Text;
using CHMCommon;

namespace CHM_CompileApp
{
    class Program
    {
        static void Main(string[] args)
        {
            if (Util.CheckInstall("HTML Help Workshop", "hhc.exe", out string hhc_path))
            {
                var compile_dir = Path.GetFullPath("./../../../htmlhelp");

                if (Directory.Exists(compile_dir))
                {
                    var default_html = Path.Combine(compile_dir, "1hh.htm");

                    var chm_file = Path.Combine(Path.GetDirectoryName(compile_dir), "help.chm");

                    ChmHelp c3 = new ChmHelp(hhc_path, compile_dir, default_html, chm_file);
                    c3.Compile();

                }

            }
        }
    }
}
